// 计算总价
define(()=>{
    return function (goods){
        return goods.reduce((prev, val)=>{
            return val.flag ? prev + val.num * val.price : prev;
        }, 0)
    }
})